import request from '@/utils/request'

// 获取角色列表
export function getList(params?: any) {
  return request({
    url: '/supplier/role/list',
    method: 'get',
    params,
  })
}

// 获取角色详情
export function getDetail(params?: any) {
  return request({
    url: '/supplier/role/info',
    method: 'get',
    params,
  })
}

// 获取全部角色
export function getAllList() {
  return request({
    url: '/supplier/role/all',
    method: 'get',
  })
}

// 添加角色
export function doAdd(data: any) {
  return request({
    url: '/supplier/role/add',
    method: 'post',
    data,
  })
}

// 编辑角色
export function doEdit(data: any) {
  return request({
    url: '/supplier/role/edit',
    method: 'post',
    data,
  })
}

// 删除角色
export function doDelete(data: any) {
  return request({
    url: '/supplier/role/del',
    method: 'post',
    data,
  })
}
